| {% extends "background/base.html" %}
| {% load static paragraphedit %}
block pagetitle
	| : 数据总览
- block content
	.panel.panel-primary
		.panel-heading
			| 书库共有
			span.badge.badge-info {{book_count|numtocnnum}}
			| 本书籍;
			span.badge.badge-info {{bookpage_count|numtocnnum}}
			| 个章节;
			span.badge.badge-info {{bookrank_count|numtocnnum}}
			| 条书籍评分;平均每本书有
			span.badge.badge-info {{average_page_per_book|numtocnnum}}
			| 个章节
		.panel-body
			#maincontainer

- block footerjs
	script(src="http://cdn.staticfile.org/highcharts/4.0.4/highcharts.js")
	script(type="text/javascript")
		$(function () {
			$('#maincontainer').highcharts({
				chart: {
					type: 'pie',
					options3d: {
						enabled: true,
						alpha: 45,
						beta: 0
					}
				},
				title: {
					text: '书籍分类统计, 共{{book_count|floatformat}}本'
				},
				tooltip: {
					pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>',
					headerFormat: '<span>{point.key}: {point.y}本</span><br/>'
				},
				plotOptions: {
					pie: {
						allowPointSelect: true,
						cursor: 'pointer',
						depth: 35,
						dataLabels: {
							enabled: true,
							format: '{point.name}: {point.y}本'
						}
					}
				},
				series: [{
					type: 'pie',
					name: 'Browser share',
					data: {{category_data|safe}}
				}]
			});
		});
